package com.jia.coupons.controller;

import com.jia.coupons.bo.SeckillVoucherBo;
import com.jia.coupons.service.SeckillVoucherService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (SeckillVoucher)表控制层
 *
 * @author makejava
 * @since 2024-10-05 21:18:09
 */
@RestController
@RequestMapping("seckill/voucher")
public class SeckillVoucherController {
    /**
     * 服务对象
     */
    @Resource
    private SeckillVoucherService seckillVoucherService;

    @PostMapping("/add")
    public ResponseEntity<SeckillVoucherBo> add(@RequestBody SeckillVoucherBo seckillVoucherBo) {
        return ResponseEntity.ok(this.seckillVoucherService.insert(seckillVoucherBo));
    }

}

